package com.isoftstone.merchant.service.merchant.impl;


import com.isoftstone.merchant.dao.merchant.MerchantMapper;
import com.isoftstone.merchant.entity.merchant.Merchant;
import com.isoftstone.merchant.service.merchant.MerchantService;
import com.isoftstone.util.PageData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: zhaojg
 * @Description
 * @Date: Created in 11:27 2017/12/6
 * @Modified by:
 */
@Service
public class MerchantServiceImpl implements MerchantService {

    @Autowired
    MerchantMapper merchantMapper;

    @Override
    public List<Merchant> getMerchantBycityId(String cityId) throws Exception {
        return merchantMapper.getMerchantBycityId(cityId);
    }

    @Override
    public List<Merchant> getMerchantList(PageData pd) throws Exception {
        return merchantMapper.getMerchantList(pd);
    }

    @Override
    public List<Merchant> getPaymentSignProject(String openAccount) throws Exception {
        return merchantMapper.getPaymentSignProject(openAccount);
    }

    @Override
    public List<Merchant> getMemberShipMerchant(String openAccount, String cityCode) throws Exception {
        return merchantMapper.getMemberShipMerchant(openAccount,cityCode);
    }

    @Override
    public String getCorpNameBycorIp(String corpId) throws Exception {
        return merchantMapper.getCorpNameBycorIp(corpId);
    }

    @Override
    public Merchant getMerchantByCorpId(String corpId) throws Exception {
        return merchantMapper.selectByPrimaryKey(corpId);
    }
}
